{% extends "mainPage.html" %}
{% load myTags %}
{#{% load isinstance %}#}
{% load static %}
{% block main_body %}

<script src="{% static 'js/mdOfOperation.js' %}"></script>
<div id="main_body">
    <fieldset class="Web_Operation" style="margin-top: 0px;">
        <legend>
            <a href="{{ return_url }}"><h2 style="display: inline"><|返回</h2></a>
            <span style="display: inline;width: 10px">:  :  :</span>
            <h4 style="display: inline;">Markdown文件{{content.filename}}内容：</h4>
        </legend>
        <div id="toc" style="height: 80px">
            <span style="margin-left: 20px">
                <h5><a id="click_list" href="javascript:void(0);" onclick="display_list()">展开/收起导航目录：</a></h5>
            </span>
            <div id="toc_link" style="display:none;">
                <table id="table_link">
                    <tbody id="left_tbody" style="width:450px;height: 820px;display: block;overflow-y: scroll;">
                        <tr style="">
                            <td style="text-align:left;">
                                <div id="doc_toc"></div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
{#            <div id="doc_toc" style="display:none"></div>#}
        </div>

        <div id="test-editormd-view" style="margin-left: 3%; width:94%">
            <textarea style="display:none;" name="test-editormd-markdown-doc">{{content.content}}</textarea>
        </div>
        <script src="{% static 'js/jquery-1.11.3.js' %}"></script>
        <script src="{% static 'editor/lib/marked.min.js' %}"></script>
        <script src="{% static 'editor/lib/prettify.min.js' %}"></script>
        <script src="{% static 'editor/lib/raphael.min.js' %}"></script>
        <script src="{% static 'editor/lib/underscore.min.js' %}"></script>
        <script src="{% static 'editor/lib/sequence-diagram.min.js' %}"></script>
        <script src="{% static 'editor/lib/flowchart.min.js' %}"></script>
        <script src="{% static 'editor/lib/jquery.flowchart.min.js' %}"></script>
        <script src="{% static 'editor/editormd.js' %}"></script>
        <link rel="stylesheet" href="{% static 'editor/css/editormd.min.css' %}">
        <link rel="stylesheet" href="{% static 'editor/css/editormd.css' %}" />
        <script type="text/javascript">
            testEditormdView2 = editormd.markdownToHTML("test-editormd-view", {
                htmlDecode      : "style,script,iframe",  // you can filter tags decode
                emoji           : true,
                taskList        : true,
                tex             : true,  // 默认不解析
                flowChart       : true,  // 默认不解析
                sequenceDiagram : true,  // 默认不解析
            });
        </script>
    </fieldset>
</div>
{% endblock %}